lib=`pwd`
inc=`pwd`

if test ! -f autogen.sh ; then
    inc=`dirname $lib` ; fi

export LIBOSIP2_CFLAGS="-I$inc/osip2/include -DOSIP_MT"
export LIBOSIP2_LIBS="$lib/osip2/src/osipparser2/libosipparser2.la $lib/osip2/src/osip2/libosip2.la"
export OSIP_CFLAGS="$LIBOSIP2_CFLAGS"
export OSIP_LIBS="$LIBOSIP2_LIBS"

export ORTP_CFLAGS="-I$inc/ortp/include"
export ORTP_LIBS="$lib/ortp/src/libortp.la"

export EXOSIP2_LIBS="$lib/exosip2/src/libeXosip2.la"
export EXOSIP2_CFLAGS="-I$inc/exosip2/include"

export with_libeXosip2="$lib/exosip2/src/libeXosip2.la"
export with_crypto="openssl"
export with_pkg_config=yes
export with_srtp="/usr"

export enable_sox=yes
export enable_debug=yes
export enable_openssl=no
export enable_commoncpp=no
export enable_stdcpp=no
export enable_strict=no

# generics...

export UCOMMON_LIBS="$lib/ucommon/openssl/libusecure.la $lib/ucommon/corelib/libucommon.la -lssl -lcrypto -lnsl -lrt -ldl -lpthread -lc -nodefaultlibs -nostdinc++ -lc"
export UCOMMON_CFLAGS="-I$inc/ucommon/inc -Wno-long-long -fno-exceptions -fno-rtti -fno-enforce-eh-specs -pthread -fno-check-new -finline -fvisibility-inlines-hidden -fvisibility=hidden -DUCOMMON_VISIBILITY=1"

test "$sharedstatedir" = '${prefix}/com' && export sharedstatedir=/var
test "$localstatedir" = '${prefix}/var' && export localstatedir=/var
test "$sysconfdir" = '${prefix}/etc' && export sysconfdir=/etc
test "$prefix" = NONE && export prefix=/usr

# platform overrides...

case "$target_os" in
*linux-gnu)
    case "$HOSTTYPE" in
    x86_64)
        if test -d /usr/lib64 ; then
            test "$libdir" = '${exec_prefix}/lib' && export libdir='${exec_prefix}/lib64'
        fi
        ;;
    esac
    ;;
*freebsd*)
    export enable_sysv=yes
    ;;
esac

export CFLAGS="$CFLAGS -g"
export CXXFLAGS="$CXXFLAGS -g"

